home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 038a / edit_qb.zip / VINCOL.ASM < prev   
Assembly Source File  |  1991-05-23  |  1KB  |  42 lines

  1. ;«RM82»«TS8,16,24,32,40,48,56,64»
  2. ; updated 5/14/91
  3.  
  4. ;============================================================================
  5. ;   Copyright (C) Copr. 1991 by Sidney J. Kelly
  6. ;           All Rights Reserved.
  7. ;           Sidney J. Kelly
  8. ;           150 Woodhaven Drive
  9. ;           Pittsburgh, PA 15228
  10. ;           home phone 412-561-0950 (7pm to 9:30pm EST)
  11. ;============================================================================
  12.  
  13. DOSSEG
  14. .MODEL MEDIUM, BASIC
  15. .CODE
  16.  
  17. ;=======================================================================
  18. ; DECLARE FUNCTION INCOLOR%()
  19. ;       IF INCOLOR% THEN
  20. ;           ... etc.
  21. ; Tests if have a color or mono display attached
  22. ; returns          -1 if color dsplay (may be a single color display)
  23. ;                   0 if BW mono display
  24. ; Note will not be fooled by Herc CGA emulation routines.
  25. ;
  26. ; Version 0.32
  27. ;=======================================================================
  28.  
  29. EVEN
  30. INCOLOR PROC FAR
  31.     Xor     AX,AX           ; Assume a Mono Display
  32.     Mov     ES,AX           ; set ES to Ram BIOS area
  33.     Mov     BX,ES:[0463h]   ; look a port info stored in RAM bios
  34.                 ; at 0000:0463h
  35.     Cmp     BL,0B4h         ; Mono reports 0B4h, color 0D4h
  36.     Je      Done            ; test port address, if Mono then quit
  37.     Mov     AX,-1           ; else report have COLOR adapter
  38. Done:
  39.     Ret
  40. INCOLOR ENDP
  41. END
  42.